/*
 * Permission.java 
 * Copyright(c) 2015 Treebear
 * ALL Rights Reserved.
 */
package org.ft.domain.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ft.mybatis.domain.AbstractAuditLongEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ft.domain.enums.PermissionType;

/**
 * @copyright (C), 2015-2019, XXX有限公司
 * @fileName: Permission
 * @author: 李阳
 * @date: 2019-06-26 10:33:07
 * @description:
 * @history: <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_permission")
public class PermissionEntity extends AbstractAuditLongEntity{

    private static final long serialVersionUID = 1L;
    /**
     * 父Id,根时为0
     */
    @TableField(value = "parent_id")
    private Long parentId;
    /**
     * 权限名称
     */
    @TableField(value = "permission_name")
    private String permissionName;
    /**
     * 权限编码
     */
    @TableField(value = "permission_code")
    private String permissionCode;
    /**
     * 权限类型,1菜单,2按钮,3Api
     */
    @TableField(value = "permission_type")
    private PermissionType permissionType;
    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;
    /**
     * 路由地址(用于前端路由,可空,不能重复)
     */
    @TableField(value = "path")
    private String path;
    /**
     * 组件位置(用于前端路由)
     */
    @TableField(value = "component")
    private String component;
    /**
     * 图标(用于前端路由)
     */
    @TableField(value = "icon")
    private String icon;
    /**
     * 权限树深度
     */
    @TableField(value = "depth")
    private Integer depth;
    /**
     * 是否已删除
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Boolean deleted;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
}